www.gusucode.com > Neutrosophic logic toolbox Package_ Neutrosophic Matrices > Neutrosophic logic toolbox Package_ Neutrosophic Matrices/@sterm/absorbadd.m

    function p=absorbadd(p);
% function p=absorbadd(p);
% absorption from addition
%In the Name of ALLAH
% neutrosphic logic toolbox for computing single valued neutrosophic Matrice 
% Copyright (C) 2015-2019 Broumi said 
%for for details see the refrence:  
%Said Broumi, Le Hoang Son, Assia Bakali, Mohamed Talea, Florentin Smarandache,
%Ganeshsree Selvachandran, Computing Operational Matrices in Neutrosophic Environments:
%A Matlab Toolbox,Neutrosophic Sets and Systems, 18,2017,pp.58-66.
% neutrosphic logic toolbox for computing single valued neutrosophic Matrice comes 
% This is free software, and you are welcome to redistribute


if length(p)>=2
    i=1;
    while (i<=length(p))
        j=i+1;
        while (j<=length(p))
            %disp('---------')
         %   p(i).t
          %  p(i+1).t
%            lesthan=(p(i).t<=p(i+1).t);
             lesthan=(p(i).t<=p(j).t);
            switch lesthan
                case 1
                    p=remove(p,j);
                    p=absorbadd(p);
                    return
                case 0
                    p=remove(p,i);
                    p=absorbadd(p);
                    return
                otherwise
                    p=p;
                    %                   removed=0;
                    
            end
            j=j+1;
        end
        i=i+1;
    end
end